package com.wyg.blog.service.blog;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.wyg.blog.model.blog.Tag;

import java.util.List;

/**
 * @description:
 * @author: WYG
 * @time: 2020/6/30 19:52
 */

public interface TagService {
    List<Tag> selectAllTags();

    List<Tag> selectLatestTags();

    Integer selectTagCount();

    IPage<Tag> selectSomeTags(Page<?> page);

    Tag selectTagByName(String name);

    Tag selectTagById(Integer id);

    String selectTagNameById(Integer id);

    List<String> selectTagNameByBid(Integer bid);

    boolean insertTag(Tag tag);

    boolean renewTagState(Integer id, boolean state);

    boolean renewTag(Integer id, String tag);

    boolean removeTag(Integer id);

    /**
     * 模糊查询
     * @param tag   查询条件
     * @return
     */
    List<Tag> fuzzySearch(String tag);
}
